package com.ruoyi.mentor.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 记录用户是否修改过密码
 * @TableName sys_update_password
 */
@TableName(value ="sys_update_password")
public class UpdatePassword implements Serializable {
    /**
     *
     */
    @TableId
    private Long id;

    private Long userId;

    /**
     * 0未修改过，1修改过
     */
    private Integer isUpdated;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     */
    public Long getUserId() {
        return userId;
    }

    /**
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 0未修改过，1修改过
     */
    public Integer getIsUpdated() {
        return isUpdated;
    }

    /**
     * 0未修改过，1修改过
     */
    public void setIsUpdated(Integer isUpdated) {
        this.isUpdated = isUpdated;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UpdatePassword other = (UpdatePassword) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getIsUpdated() == null ? other.getIsUpdated() == null : this.getIsUpdated().equals(other.getIsUpdated()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getIsUpdated() == null) ? 0 : getIsUpdated().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", isUpdated=").append(isUpdated);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
